home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / isdigit < prev    next >
Text File  |  2001-03-21  |  881b  |  27 lines

  1. Synopsis:
  2.    $isalpha(<text>)
  3.    $isdigit(<text>)
  4.  
  5. Technical:
  6.    These function test whether the first character in the given string is
  7.    an alphabetical character or a digit.  Only the first character is
  8.    tested.
  9.  
  10. Practical:
  11.    These functions are useful for testing an input string to see whether it
  12.    is a number or a text string.  One use for this might be to check if it
  13.    would be suitable input for $iptoname() or $nametoip().  Keep in mind
  14.    that only the first character is tested, so this isn't a reliable way
  15.    to see if the entire string is a number.
  16.  
  17. Returns:
  18.    "true" or "false" value if first character is a letter or a digit
  19.  
  20. Examples:
  21.    $isalpha(hello)         returns true
  22.    $isalpha(2hello)        returns false
  23.    $isdigit(123)           returns true
  24.    $isdigit(2abc)          returns true
  25.    $isdigit(a123)          returns false
  26.  
  27.